import os
from langchain_openai import ChatOpenAI
from langchain_community.llms import Ollama
from utils.get_weather import *
from utils.TimeUtils import *
from langchain.prompts import PromptTemplate


api_key = os.getenv("OPENAI_API_KEY")
base_url = os.getenv("OPENAI_API_BASE")

llm = ChatOpenAI(
    model="gpt-3.5-turbo",
    temperature=0,
    api_key=api_key,
    base_url=base_url
)

prompt = PromptTemplate.from_template("你是一个算命大师，请模仿示例起3个{county}名字,比如男孩经常被叫做{boy}, 女孩经常被叫做{girl}")
message = prompt.format(county="中国特色", boy="李白", girl="李宇春" )

print(message)
res = llm.invoke(message)
print(res.content)

